class UserBook < ActiveRecord::Base
  belongs_to :user
  belongs_to :book
  attr_accessor :user, :book, :book_id
  attr_accessible :user, :book, :book_id
  
  def book_id=(book_id)
    write_attribute(:book_id, book_id)
  end
  
  def book_id
    read_attribute(:book_id)
  end
end
